<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <script th:src="@{/webjars/jquery/2.2.1/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/jquery-3.1.1.min.js}"></script>
    <script type="text/javascript">
            var test = $("#test").val();
            alert(test)
    </script>
</head>
<body>
<h1 th:inline="text">Hello.v.2</h1>
<input th:id="test" th:value="test"/>
</body>
</html>